<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>聊天框</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="layui/css/layui.css">
    <script src="layui/layui.js"></script>
    <script src="chat.js"></script>
</head>
<body>
<button id="open">打开会话</button>
<script>
    layui.use('layer', function(){
        const layer = layui.layer;
        const $ = layui.jquery;
        $('#open').on('click',function (){
            new ChatBox();
        });
    });
</script>
</body>
</html>